package com.utils;

import com.model.TChina;

import java.text.Collator;
import java.util.Comparator;
import java.util.Locale;

/**
 *
 */
public class CompareTChina implements Comparator {
    @Override
    public int compare (Object o1, Object o2) {
        TChina t1 = (TChina) o1;
        TChina t2 = (TChina) o2;
        Collator instance = Collator.getInstance(Locale.CHINA);
        return instance.compare(t1.getName(),t2.getName());
    }
}
